<!--内页详情开始-->
<div class="n_Main">
    <div class="n_left">
        <div class="n_title">
            <h3>留言反馈</h3>
            <p>MESSAGE</p>
        </div>
        <div class="map">
            <div id="allmap" style="width:230px; height:190px"></div>
            {{--<a href="contact.php"><img src="{{Theme::asset()->url('images/n_map.png')}}" /></a>--}}
        </div>
        <div class="QQline">
            <a rel="nofollow" target="_blank" @if(!empty(Theme::get('basis_config')['qq']))href="http://wpa.qq.com/msgrd?v=3&uin={{Theme::get('basis_config')['qq']}}&site=qq&menu=yes"@else href="javascript:;"@endif><img src="{{Theme::asset()->url('images/QQ.png')}}" /></a>
        </div>

        <div class="n_contact">
            <img src="{{Theme::asset()->url('images/n_contact.jpg')}}" />
            电话：@if(!empty(Theme::get('site_config')['phone'])){{Theme::get('site_config')['phone']}}@endif<br/>
            邮箱：@if(!empty(Theme::get('site_config')['Email'])){{Theme::get('site_config')['Email']}}@endif<br/>
            地址：@if(!empty(Theme::get('site_config')['company_address'])){{Theme::get('site_config')['company_address']}}@endif<br/>
            网址：<a href="@if(!empty(Theme::get('site_config')['site_url'])){{Theme::get('site_config')['site_url']}}@endif">@if(!empty(Theme::get('site_config')['site_url'])){{Theme::get('site_config')['site_url']}}@endif</a><br/>
        </div>
    </div>

    <div class="n_right">
        <div class="location">
            当前所在位置：首页　>>　关于我们
        </div>
        <div class="n_centent">
            <script type="text/javascript">
                function cfm_msg(){
                    if($("#nickname").val()==""){
                        alert("请填写联系人姓名！");
                        $("#nickname").focus();
                        return false;
                    }
                    if($("#contact").val()==""){
                        alert("请填写联系人电话！");
                        $("#contact").focus();
                        return false;
                    }
                    if($("#content").val()==""){
                        alert("请填写留言内容！");
                        $("#content").focus();
                        return false;
                    }
                    // $.ajax({
                    //     type:'post',
                    //     url:'messageAdd',
                    //     data:$("#form").serialize(),
                    //     dataType:'json',
                    //     success:function (data) {
                    //         alert(data);
                    //     },
                    //     error:function (data) {
                    //         alert('提交失败');
                    //     }
                    // })
                }
            </script>
            <form name="form" id="form" class="message_form"  action="messageAdd">
                {{csrf_field()}}
                <ul>
                    <li class="table_1">
                        <div>
                            <label>姓　　名：</label>
                            <input type="text" name="name" id="name" style="width:262px; height:30px; outline:none" nullmsg="姓名不能为空" datatype="s2-16" errormsg="姓名格式不正确！"/>
                        </div>
                    </li>
                    <li class="table_1">
                        <div>
                            <label>电　　话：</label>
                            <input type="text" name="phone" id="phone" nullmsg="电话不能为空" datatype="m" errormsg="电话格式不正确" style="width:262px; height:30px;outline:none"/>
                        </div>
                    </li>
                    <li>
                        <div>
                            <label>电子邮箱：</label>
                            <input type="text" name="email" id="email" nullmsg="邮箱不能为空" datatype="e" errormsg="邮箱格式不正确" style="width:632px; height:30px;outline:none" />
                        </div>
                    </li>
                    <li>
                        <div>
                            <label>联系地址：</label>
                            <input type="text" name="address" id="address" datatype="*"  nullmsg="地址不能为空" style="width:632px; height:30px;outline:none" />
                        </div>
                    </li>
                    <li>
                        <div>
                            <label style="vertical-align: top;    line-height:50px;">留言内容：</label>
                            <textarea name="content" id="content" style=" width:632px; height:180px; background:#eee; border:1px solid #ddd;outline:none"  datatype="*" nullmsg="留言不能为空"></textarea>
                        </div>
                    </li>
                    <input type="hidden" name="action" id="action" value="add" />
                    <input id="res" name="res" type="reset" style="display:none;" />
                    <li>
                        <button class="tijiao" type="submit">
                                提交
                        </button>
                        <div style="margin-top:28px; float:left;">
                            （请认真填写以上以便及时准确联系到您）
                        </div>
                    </li>
                </ul>
            </form>
            　　　




        </div>
    </div>
</div>
<!--内页详情结束-->
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=wsXHR0znPd0KdtXoL4KiGe2lLlfL6IGx"></script>
{!! Theme::asset()->container('custom-css')->usePath()->add('nei_css', 'css/nei.css') !!}
{!! Theme::asset()->container('specific-css')->usepath()->add('validform-style','plugins/jquery/validform/css/style.css') !!}
{!! Theme::asset()->container('specific-js')->usepath()->add('validform','plugins/jquery/validform/js/Validform_v5.3.2_min.js') !!}

<script type="text/javascript">
    // 百度地图API功能
    var map = new BMap.Map("allmap");
    var point = new BMap.Point(116.331398,38.897445);
    map.centerAndZoom(point,12);
    // 创建地址解析器实例
    var myGeo = new BMap.Geocoder();
    // 将地址解析结果显示在地图上,并调整地图视野
    myGeo.getPoint("@if(!empty(Theme::get('site_config')['company_address'])){{Theme::get('site_config')['company_address']}}@else北京市@endif", function(point){
        if (point) {
            map.centerAndZoom(point, 16);
            map.addOverlay(new BMap.Marker(point));
        }else{
            // alert("您选择地址没有解析到结果!");
        }
    }, "北京市");
    $(function(){
        var demo = $(".message_form").Validform({
            tiptype:3,
            showAllError:true,
            ajaxPost:true,
            callback:function () {
                $("#Validform_msg").empty();
                $("input[name='res']").click();
            }
        });
        demo.config({
            ajaxpost:{
                headers: { 'X-CSRF-TOKEN' : '{{ csrf_token() }}' }
            },

        })

    })

</script>
